using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace LockImage.Gui.Dialog
{
    public partial class ChoosePasswordDialog : Form
    {
        private MainForm gui;

        public ChoosePasswordDialog(MainForm gui)
        {
            this.gui = gui;
            InitializeComponent();

        }


        private void okButton_Click(object sender, EventArgs e)
        {
            if (typePasswordTextBox.Text != repeatPasswordTextBox.Text)
            {
                MessageBox.Show("Passwords do not match!");
            }
            else {
                this.gui.SaveTo(this.typePasswordTextBox.Text);
                this.Close();

            }
        }

        private void cancelButton_Click(object sender, EventArgs e)
        {
            this.Close();

        }
    }
}